﻿@model MvcPhotos.Web.Models.Photo
    <div class="create_body">
    @using (Html.BeginRouteForm("Default",new {action="Create",controller="Photos"}, FormMethod.Post, new { enctype = "multipart/form-data",@class="create_form" }))
    {
        <div>
        @Html.LabelFor(m => m.File)
        </div>
        <input type="file" name="file"/>
        
        <div>
        @Html.LabelFor(m => m.InputTags)<br />
        </div>
        @Html.EditorFor(m => m.InputTags)
        
        <div>
        @Html.LabelFor(m => m.Description)<br />
        </div>
        @Html.EditorFor(m => m.Description)
        
        <div>
        @Html.LabelFor(m => m.DeleteCode)<br />
        </div>
        @Html.PasswordFor(m => m.DeleteCode)
        
        <p><button type="submit">Upload</button></p>

        <div>
        @Html.ValidationSummary()
        </div>
    }
    @if (!string.IsNullOrWhiteSpace(ViewBag.Message))
    {
        <p class="message">@ViewBag.Message</p>
    }

    </div>
@section css
{
    <style>
    html
    {
        overflow:hidden;    
        height:500px;
    }
    body
    {
        color:#000;
        background-color:#fff;
        height:500px;
    }
    .create_body
    {
        padding: 4pt;
    }
    .create_form div
    {
        font-size:20pt;
        font-weight:bold;
    }
    .create_form input
    {
        width: 20em;
    }
    .create_form textarea
    {
        width: 20em;
        height:4em;
    }
    </style>
}

@section js
{
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
}
